Skip to main content
Version: 8.4.10.2

OptOrderReplaceGateway

V8 Message Definiton

Records updated, or replaced into the OptionOrderReplaceGateway table are validated and then converted to SpdrParentOrder cancel/replace records and forwarded to the appropriate execution engine for futher processing.\nSee the SpiderRock Execution Engine concept guide for more details.

METADATA

AttributeValue
Topic5120-srse-gateway
MLink TokenSystemData
ProductSRTrade
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
okey_atenum - AssetTypePRI'None'
okey_tsenum - TickerSrcPRI'None'
okey_tkVARCHAR(12)PRI''
okey_yrSMALLINT UNSIGNEDPRI0
okey_mnTINYINT UNSIGNEDPRI0
okey_dyTINYINT UNSIGNEDPRI0
okey_xxDOUBLEPRI0
okey_cpenum - CallPutPRI'Call'
accntVARCHAR(16)PRI''
spdrSourceenum - SpdrSourcePRI'None'
groupingCodeCHAR(19)PRI'0000-0000-0000-0000'
clientFirmVARCHAR(16)PRI''
orderNumberBIGINT0SPDR order number
orderSizeINT0maximum fill size contracts
orderActiveSizeINT0total activated size total size released for execution 1 all available size
orderPrcLimitFLOAT0Order price limit Valid range 0005 99990 Required if orderLimitType is Prc PrcDe PrcDeX PrcDeT PrcDeXT Ignored if orderLimitType is Market Otherwise must be set to 0
orderVolLimitFLOAT0Order volatility limit Valid range 0005 9000 Required if orderLimitType is Vol VolX Ignored if orderLimitType is Market Otherwise must be set to 0
takeProbabilityFLOAT0.50probability threshold for taking an existing public quote
makeProbabilityFLOAT0.50probability threshold for posting in an exchange order book
strategyVARCHAR(36)''Client strategy string This value will appear on the SR Trade Monitor and in execution reports
userNameVARCHAR(24)''
orderDttmDATETIME(6)'2000-01-01'Order entry time Will be set to arrival time if not supplied
positionTypeenum - PositionType'None'
ssaleFlagenum - ShortSaleFlag'None'used to determine stock autohedge flags
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
okey_tk1
okey_yr2
okey_mn3
okey_dy4
okey_xx5
okey_cp6
okey_at7
okey_ts8
accnt9
spdrSource10
groupingCode11
clientFirm12

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgOptOrderReplaceGateway` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`orderNumber` BIGINT NOT NULL DEFAULT 0 COMMENT 'SPDR order number',
`orderSize` INT NOT NULL DEFAULT 0 COMMENT 'maximum fill size (contracts)',
`orderActiveSize` INT NOT NULL DEFAULT 0 COMMENT 'total activated size (total size released for execution) (-1 = all available size)',
`orderPrcLimit` FLOAT NOT NULL DEFAULT 0 COMMENT 'Order price limit. Valid range: [0.005, 9999.0]. Required if `orderLimitType` is Prc, PrcDe, PrcDeX, PrcDeT, PrcDeXT. Ignored if `orderLimitType` is Market. Otherwise must be set to 0.',
`orderVolLimit` FLOAT NOT NULL DEFAULT 0 COMMENT 'Order volatility limit. Valid range: [0.005, 9.000]. Required if `orderLimitType` is Vol, VolX. Ignored if `orderLimitType` is Market. Otherwise must be set to 0.',
`takeProbability` FLOAT NOT NULL DEFAULT 0.50 COMMENT 'probability threshold for taking an existing public quote',
`makeProbability` FLOAT NOT NULL DEFAULT 0.50 COMMENT 'probability threshold for posting in an exchange order book',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'Client strategy string. This value will appear on the SR Trade Monitor and in execution reports.',
`userName` VARCHAR(24) NOT NULL DEFAULT '',
`orderDttm` DATETIME(6) NOT NULL DEFAULT '2000-01-01' COMMENT 'Order entry time. Will be set to arrival time if not supplied.',
`positionType` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None' COMMENT 'used to determine stock auto-hedge flags',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`,`accnt`,`spdrSource`,`groupingCode`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records updated, or replaced into the OptionOrderReplaceGateway table are validated and then converted to SpdrParentOrder cancel/replace records and forwarded to the appropriate execution engine for futher processing.\nSee the SpiderRock Execution Engine concept guide for more details.';

SELECT TABLE EXAMPLE QUERY

SELECT
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`accnt`,
`spdrSource`,
`groupingCode`,
`clientFirm`,
`orderNumber`,
`orderSize`,
`orderActiveSize`,
`orderPrcLimit`,
`orderVolLimit`,
`takeProbability`,
`makeProbability`,
`strategy`,
`userName`,
`orderDttm`,
`positionType`,
`ssaleFlag`,
`timestamp`
FROM `SRTrade`.`MsgOptOrderReplaceGateway`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call'
AND
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource` = 'None'
AND
/* Replace with a CHAR(19) */
`groupingCode` = 'Example_groupingCode'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRTrade`.`MsgOptOrderReplaceGateway` 
SET
/* Replace with a BIGINT */
`orderNumber` = 1234567890,
/* Replace with a INT */
`orderSize` = 5,
/* Replace with a INT */
`orderActiveSize` = 5,
/* Replace with a FLOAT */
`orderPrcLimit` = 1.23,
/* Replace with a FLOAT */
`orderVolLimit` = 1.23,
/* Replace with a FLOAT */
`takeProbability` = 1.23,
/* Replace with a FLOAT */
`makeProbability` = 1.23,
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy',
/* Replace with a VARCHAR(24) */
`userName` = 'Example_userName',
/* Replace with a DATETIME(6) */
`orderDttm` = '2022-01-01 12:34:56.000000',
/* Replace with a ENUM('None','Opening','Closing','Auto') */
`positionType` = 'None',
/* Replace with a ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') */
`ssaleFlag` = 'None',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call'
AND
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource` = 'None'
AND
/* Replace with a CHAR(19) */
`groupingCode` = 'Example_groupingCode'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRTrade`.`MsgOptOrderReplaceGateway`(
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts`,
/* Replace with a VARCHAR(12) */
`okey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`okey_yr`,
/* Replace with a TINYINT UNSIGNED */
`okey_mn`,
/* Replace with a TINYINT UNSIGNED */
`okey_dy`,
/* Replace with a DOUBLE */
`okey_xx`,
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp`,
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource`,
/* Replace with a CHAR(19) */
`groupingCode`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a BIGINT */
`orderNumber`,
/* Replace with a INT */
`orderSize`,
/* Replace with a INT */
`orderActiveSize`,
/* Replace with a FLOAT */
`orderPrcLimit`,
/* Replace with a FLOAT */
`orderVolLimit`,
/* Replace with a FLOAT */
`takeProbability`,
/* Replace with a FLOAT */
`makeProbability`,
/* Replace with a VARCHAR(36) */
`strategy`,
/* Replace with a VARCHAR(24) */
`userName`,
/* Replace with a DATETIME(6) */
`orderDttm`,
/* Replace with a ENUM('None','Opening','Closing','Auto') */
`positionType`,
/* Replace with a ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') */
`ssaleFlag`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'None',
'None',
'Example_okey_tk',
123,
1,
1,
4.56,
'Call',
'Example_accnt',
'None',
'Example_groupingCode',
'Example_clientFirm',
1234567890,
5,
5,
1.23,
1.23,
1.23,
1.23,
'Example_strategy',
'Example_userName',
'2022-01-01 12:34:56.000000',
'None',
'None',
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRTrade`.`MsgOptOrderReplaceGateway` 
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call'
AND
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource` = 'None'
AND
/* Replace with a CHAR(19) */
`groupingCode` = 'Example_groupingCode'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='OptOrderReplaceGateway' ORDER BY ordinal_position ASC;